import { _decorator, Component, Node } from 'cc';
import { CtrlBase } from './CtrlBase';
const { ccclass, property } = _decorator;

@ccclass('MoveCtrl')
export class MoveCtrl extends CtrlBase {

    onInit() {
    }




    onUpdate(dt: number): void {
        let pos = this._owner.node.position.clone();
        pos.x -= this._owner.speed * dt;
        this._owner.node.setPosition(pos);
    }

}


